#ifndef imsplit_H
#define imsplit_H

//! UI header includes most of the widgets.
#include "ui_imsplit.h"
#include <QDesktopWidget>
#include <QSettings>
#include <QFileDialog>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QUrl>
#include <QImageReader>
#include <QImageWriter>
#include <QProgressDialog>

//! Logging macro.
#define MSG(a) ui.log->append(a)

class imsplit : public QDialog
{
    Q_OBJECT

public:
    //! Ctor.
    imsplit(QWidget *parent = 0, Qt::WFlags flags = 0);

    //! Dtor.
    ~imsplit();

    //! Read app settings.
    void imsplit::readSettings();

    //! Store app settings.
    void imsplit::writeSettings();

    //! Check for image data in dragged item.
    void dragEnterEvent(QDragEnterEvent *event);

    //! Load image from dropped item.
    void dropEvent(QDropEvent *event);

signals:
    void justDoit();

public slots:
    void on_loadImage_clicked();
    void doit();

    //! Data.
private:
    Ui::imsplitClass ui;
    QString imageSourceName;
};

#endif // imsplit_H
